import request from '../utils/request'

export function findDeptTree() {
    return request({
        url:'dept/get',
        method:'get'
    })
}

export function addDept(data) {
    return request({
        url:'dept/save',
        method:'post',
        data
    })
}

/**
 * 删除部门
 * @param id
 */
export function deleteDeptById(id) {
    return request({
        url:'/dept/deleteById',
        method:'delete',
        params:{
            id:id,
        }
    })
}

/**
 * 修改部门
 * @param data
 */
export function editDept(data) {
    return request({
        url:'/dept/edit',
        method:'put',
        data,
    })
}
